import Qt 4.7

Rectangle {
    property alias text: buttonText.text
    property alias font: buttonText.font

    signal clicked()

    width: buttonText.width + 20
    height: buttonText.height + 20
    radius: 5
    color: buttonMouseArea.pressed ? "red" : "blue"

    Text {
        id: buttonText
        anchors.centerIn: parent
    }

    MouseArea {
        id: buttonMouseArea
        anchors.fill: parent
        onClicked: parent.clicked()
    }

}
